package com.team.student.controller;

import com.team.student.entity.Grade;
import com.team.student.service.GradeService;
import com.team.student.service.impl.GradeServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class GradeController {
    @RequestMapping("/getGrade")
    @ResponseBody
    public List<Grade> getGrade(){
        GradeService gs= new GradeServiceImpl();
        List<Grade> li=gs.getAllGrade();
        return li;
    }
}
